/**
 * @Date: 2022-04-07 15:16:07
 * @LastEditors: sailornpg
 * @LastEditTime: 2022-07-15 09:40:04
 * @FilePath: \node-koa2-imitation-microblog\conf\yourDb.js
 * @Description:你的数据库配置
 */
const env = process.env.NODE_ENV; //环境参数
let REDIS_CONF;
let MYSQL_CONF;
const PASSWORD_SCRET_KEY = ""; //设置你自己的密钥即可
const SESSION_SCRET_KEY = ""; //设置你自己的密钥即可
MYSQL_CONF = {
  host: "",
  user: "",
  password: "",
  port: "",
  database: "",
};
if (env === "dev") {
  MYSQL_CONF = {
    host: "",
    user: "",
    password: "",
    port: "",
    database: "",
  };
  //redis
  REDIS_CONF = {
    port: "",
    host: "",
  };
}
//生产环境
if (env === "production") {
  MYSQL_CONF = {
    host: "",
    user: "",
    password: "",
    port: "",
    database: "",
  };
  //redis
  REDIS_CONF = {
    port: "",
    host: "",
  };
}
module.exports = {
  MYSQL_CONF,
  REDIS_CONF,
  PASSWORD_SCRET_KEY,
  SESSION_SCRET_KEY,
};
